package fw.asmx.launcher.ui;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.ViewGroup;

public class DraggableWidgetView extends ViewGroup
{
    private int rowCount;
    private int colCount;

    public DraggableWidgetView(Context context)
    {
        super(context);
    }

    public DraggableWidgetView(Context context, AttributeSet attrs)
    {
        super(context, attrs);
    }

    public DraggableWidgetView(Context context, AttributeSet attrs, int defStyleAttr)
    {
        super(context, attrs, defStyleAttr);
    }

    private void init()
    {
        rowCount = 5;
        colCount = 5;
    }

    @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
    {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }

    @Override protected void onLayout(boolean changed, int l, int t, int r, int b)
    {
        int cnt = getChildCount();
        for (int i = 0; i < cnt; i++)
        {
            getChildAt(i).layout(l, t, r, b);
        }
    }

    @Override public boolean onInterceptTouchEvent(MotionEvent ev)
    {
        return super.onInterceptTouchEvent(ev);
    }

    @Override public boolean onTouchEvent(MotionEvent event)
    {
        return super.onTouchEvent(event);
    }
}
